//
//  SISSHouseTagsLabelView.m
//  SISSAPP
//
//  Created by 袁应荣 on 2017/10/23.
//  Copyright © 2017年 优房网. All rights reserved.
//

#import "SISSHouseTagsLabelView.h"

@implementation SISSHouseTagsLabelView

#pragma mark - UI
- (void)initUI {
    [super initUI];
    
    UILabel *metroLabel = [UILabel yyr_labelWithText:@"地铁口物业" fontSize:11 textColor:MAIN_TEXT_COLOR];
    [self addSubview:metroLabel];
    
    UILabel *redBookLabel = [UILabel yyr_labelWithText:@"红本在手" fontSize:11 textColor:MAIN_TEXT_COLOR];
    [self addSubview:redBookLabel];
    
    UILabel *northSouthLabel = [UILabel yyr_labelWithText:@"南北通透" fontSize:11 textColor:MAIN_TEXT_COLOR];
    [self addSubview:northSouthLabel];
    
    UILabel *twoYearsLabel = [UILabel yyr_labelWithText:@"满二年" fontSize:11 textColor:MAIN_TEXT_COLOR];
    [self addSubview:twoYearsLabel];
    
    UILabel *degreeLabel = [UILabel yyr_labelWithText:@"学位房" fontSize:11 textColor:MAIN_TEXT_COLOR];
    [self addSubview:degreeLabel];
    
    self.markLabels = @[metroLabel,redBookLabel,northSouthLabel,twoYearsLabel,degreeLabel];
    
    WeakSelf
    CGFloat margin = 8.0;
    [metroLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf);
        make.top.equalTo(weakSelf).offset(margin);
    }];
    
    [redBookLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(metroLabel);
        make.left.equalTo(metroLabel.mas_right).offset(0.5 * margin);
    }];
    
    [northSouthLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(redBookLabel);
        make.left.equalTo(redBookLabel.mas_right).offset(0.5 * margin);
    }];
    
    [twoYearsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(northSouthLabel);
        make.left.equalTo(northSouthLabel.mas_right).offset(0.5 * margin);
    }];
    
    [degreeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(twoYearsLabel);
        make.left.equalTo(twoYearsLabel.mas_right).offset(0.5 * margin);
    }];
}

@end
